Skip to content

Improve performance of ErasedDecls phase #4145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

performance test scheduled: 2 job(s) in queue, 1 running.

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confident enough the change's a refactoring for approval (assuming method names aren't too misleading) — feel free to search more qualified reviewers 😉

else tp.derivedClassInfo(decls = tp.decls.filteredScope(!_.is(Erased)))
case _ => tp
override def transformInfo(tp: Type, sym: Symbol)(implicit ctx: Context): Type = {
if (sym.is(JavaDefined) || sym.is(Scala2x)) tp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use InfoTransformer#mayChange instead, it's more efficient because it avoids having to force the info of the symbol: https://github.com/lampepfl/dotty/blob/2b342722681bf49780e575189356b0013f4dbfe6/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala#L55-L59

@nicolasstucki nicolasstucki force-pushed the improve-ErasedDecls-performance branch from b5be6c3 to 118bbe0 Compare March 20, 2018 14:49
@dottybot
Copy link
Member

performance test scheduled: 2 job(s) in queue, 1 running.

@nicolasstucki nicolasstucki force-pushed the improve-ErasedDecls-performance branch from 118bbe0 to 69a98aa Compare March 20, 2018 14:52
@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

performance test scheduled: 2 job(s) in queue, 1 running.

@dottybot
Copy link
Member

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4145/ to see the changes.

Benchmarks is based on merging with master (e5ff11c)

@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

performance test scheduled: 2 job(s) in queue, 1 running.

@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

performance test scheduled: 2 job(s) in queue, 1 running.

@dottybot
Copy link
Member

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4145/ to see the changes.

Benchmarks is based on merging with master (e5ff11c)

@nicolasstucki nicolasstucki merged commit b294b6c into scala:master Mar 20, 2018
@dottybot
Copy link
Member

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4145/ to see the changes.

Benchmarks is based on merging with master (911e388)

@Blaisorblade Blaisorblade deleted the improve-ErasedDecls-performance branch March 21, 2018 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants